import {SetMetadata} from '@nestjs/common';
import {ROLE_KEY as ROLE_KEYS} from '@/common/config/role.menu';

export const ROLE_KEY = 'ROLE_KEY';
export type RoleOptions = ROLE_KEYS[] | {include?: ROLE_KEYS[], exclude?: ROLE_KEYS[]}
export const Role = (role: RoleOptions) => {
    return SetMetadata(ROLE_KEY, role);
};
